package com.ifinc.common.protocol.i8583;

import com.ifinc.common.protocol.i8583.field.*;

import java.util.LinkedHashMap;

/**
 * Created with IntelliJ IDEA.
 * User: luotao
 * Date: 11/16/13
 * Time: 11:06 AM
 */
public class I8583DefineFieldBoc implements I8583Define {
    @Override
    public LinkedHashMap<Integer, Field> getFieldInfo() {
        LinkedHashMap<Integer, Field> fieldMap = new LinkedHashMap<Integer, Field>();
        fieldMap.put(-3, new FieldBcd(10));
        fieldMap.put(-2, new FieldBcd(4));
        fieldMap.put(-1, new FieldBcd(4));
        fieldMap.put(1, new FieldBitMap());
        fieldMap.put(2, new FieldVarBcd(19));
        fieldMap.put(3, new FieldBcd(6));
        fieldMap.put(4, new FieldBcd(12));
        fieldMap.put(8, new FieldAsc(11));
        fieldMap.put(11, new FieldBcd(6));
        fieldMap.put(12, new FieldAsc(6));
        fieldMap.put(14, new FieldBcd(4));
        fieldMap.put(22, new FieldBcd(3));
        fieldMap.put(24, new FieldBcd(3));
        fieldMap.put(25, new FieldBcd(1));
        fieldMap.put(32, new FieldVarBcd(4));
        fieldMap.put(41, new FieldAsc(8));
        fieldMap.put(42, new FieldAsc(15));
        fieldMap.put(44, new FieldVar(99));
        fieldMap.put(49, new FieldBcd(3));
        fieldMap.put(64, new FieldMac(2,3,4,11,49,41));
        return fieldMap;
    }
}
